﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CBE.Model;
using CBE.Services;
using Common.UI.EM;
using CBE.UI.Control.Views;

namespace CBE.UI.Control
{
    public class AdministrarComprasController: GenericEntityController<AdministrarComprasServiceLogic, Compras, AdministrarComprasCriteria, AdministrarComprasView>
    {
        public override string Title
        {
            get
            {
                return "Administrar Compras";
            }
        }

        protected override void CreateEntityPresentationModel()
        {
            this.EntityPresentationModel = new AdministrarComprasEntityPresentationModel(base.CreateFilterView(), base.CreateListView(), base.CreateDetailView());
        }

        protected override Common.UI.EM.Views.DetailDataView CreateDetailDataView()
        {
            return new AdministrarComprasDetailDataView();
        }

        protected override Common.UI.EM.Views.FilterDataView CreateFilterDataView()
        {
            return new AdministrarComprasFilterDataView();
        }

        protected override void AddColumnDefinitions()
        {
            this.EntityPresentationModel.AddColumnDefinition(AdministrarComprasView.NroComprobantePropertyName, "Nro. Comprobante");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarComprasView.NombreProveedorPropertyName, "Proveedor");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarComprasView.FechaRecepcionStringPropertyName, "Fecha recepción");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarComprasView.ProductosStringPropertyName, "Productos");
            this.EntityPresentationModel.AddColumnDefinition(AdministrarComprasView.MontoPropertyName, "Monto");
        }
    }
}
